//
//  AppConfig.swift
//  TalkeApp
//
//  Created by lhf on 2024/3/8.
//

import Foundation
import Hue

class AppConfig {
    
    //单例
    static let sharedInstance = AppConfig()
    private init() {} //This prevents others from using the default '()' initializer for this class.
    
    // 预览链接
    let COURSE_LINK_PREFIX = "https://preview.beibeihuiyu.com/api/unified/tv/source-preview?sourceKey="
    
    // 一键登录key
    let AtAuthKey = "5WbTr4+l7/sV4ASRRoDdtf+/cHlLt7BI1lVrSNPq08JKZykc0KyoTklSQwB/QPXYZAohm9PoUZrJ883D+aszT4dp86K0rCuW6FVa4CWr/oQoA9uM/hU1yBVQzIjvYwm5I/VOoI1rxdMg8SA0eDdO9+TnDNKlMNo4aGx0ywVZDbPRoumkowy1qK5RiN997gGmtX7fErqbHReBlZ/JnXmR3gSXNmt7JsERbxYbBwFJK3IwK6gc97LyO9MELTPMxL72hUnVADYn52Y="
    
    // 腾讯云对象存储
    let QCloudCOSBucket = "zlmk-relive-1319190471"
    let QCloudCOSRegionName = "ap-guangzhou"
    
    // 屏幕的物理宽度
    let kScreenWidth = UIScreen.main.bounds.size.width
    // 屏幕的物理高度
    let kScreenHeight = UIScreen.main.bounds.size.height
    // 白色
    let whiteColor = UIColor(hex: "#ffffff")
    // 导航栏字体大小
    let navFont = CGFloat(18)
    // 边框颜色
    let borderColor = UIColor(hex: "#e5e5e5").cgColor
    // 红色边框
    let borderColorRed = UIColor(hex: "#ff5b62").cgColor
    // 红色
    let redColor = UIColor(hex: "#ff5b62")
    // 主题色
    let MAIN_COLOR = UIColor(hex: "#3b4fa0")
    // 主题色浅色
    let MAIN_LIGHT_COLOR = UIColor(hex: "#e4e8f3")
    // 主题背景色
    let MAIN_BG_VIEW_COLOR = UIColor(hex: "#F7F9FB")
    // 主题色（字体）
    let MAIN_TITLE_COLOR = UIColor(hex: "#080F2C")
    // 主题灰色
    let MAIN_GRAY_COLOR = UIColor(hex: "#F8F8F8")
    // 主题灰色（字体）
    let MAIN_GRAY_TITLE_COLOR = UIColor(hex: "#52576B")
    // 主题橙色
    let MAIN_ORANGE_COLOR = UIColor(hex: "#FE7A4D").alpha(0.1)
    // 主题橙色（字体）
    let MAIN_ORANGE_TITLE_COLOR = UIColor(hex: "#FE7A4D")
    // 加载失败图片背景色
    let FAIL_LOAD_BACKGROUND_COLOR = UIColor(hex: "#f3f3f3")
    // 自定义动画时间
    let TIMEDELAY = 0.2
    // 验证码倒计时
    let vcodeInterval: Int = 60
    
    //---------------------------正则表达式---------------------------
    // 纯数字
    let numberRE: String = "^[0-9]+$"
    // 邮箱匹配
    let mailRE: String = "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$"
    // 匹配用户名 字面或者数字组合 4到16位
    let UsernameRE: String = "^[a-z0-9_-]{4,16}$"
    // 匹配密码 字面加下划线，6到18位
    let PasswordRE: String = "^[a-z0-9_-]{6,18}$"
    // 匹配16进制
    let HexValueRE: String = "^#?([a-f0-9]{6}|[a-f0-9]{3})$"
    //内容带分割符号 “Anne-Blair”
    let SlugRE: String = "^[a-z0-9-]+$"
    // 匹配URL
    let isURLRE: String = "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$"
    // 匹配IP地址
    let IPAddressRE: String = "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
    // 是HTML <center>内容<\center>  符合
    let HTMLTagRE: String = "^<([a-z]+)([^<]+)*(?:>(.*)<\\/\\1>|\\s+\\/>)$"
    // 日期(年-月-日)
    let isDate1RE: String = "(\\d{4}|\\d{2})-((1[0-2])|(0?[1-9]))-(([12][0-9])|(3[01])|(0?[1-9]))"
    // 日期(月/日/年)
    let isDate2RE: String = "((1[0-2])|(0?[1-9]))/(([12][0-9])|(3[01])|(0?[1-9]))/(\\d{4}|\\d{2})"
    // 时间(小时:分钟, 24小时制)
    let TimeFormatRE: String = "((1|0?)[0-9]|2[0-3]):([0-5][0-9])"
    // 是汉字
    let isChineseRE: String = "[\\u4e00-\\u9fa5]"
    // 中文及全角标点符号(字符)
    let ChineseParagraphRE: String = "[\\u3000-\\u301e\\ufe10-\\ufe19\\ufe30-\\ufe44\\ufe50-\\ufe6b\\uff01-\\uffee]"
    // 中国大陆固定电话号码
    let fixedLineTelephoneRE: String = "(\\d{4}-|\\d{3}-)?(\\d{8}|\\d{7})"
    // 中国大陆身份证号(15位或18位)
    let IdNumRE: String = "\\d{15}(\\d\\d[0-9xX])?"
    // 手机号
    let isIphoneNumRE: String = "1\\d{10}"
    // 邮政编码
    let zipCodeRE: String = "[1-9]\\d{5}"
    
    //---------------------------通知---------------------------
    let LoginNotification = "LoginNotification"
    let OrganizeInfoChangeNotification = "OrganizeInfoChange"
    let RootPageIndexNotification = "RootPageIndex"
    let AuthPageFunctionNotification = "AuthPageFunction"
    let userLocationNotification = "UserLocation"
}

